<template>
  <el-dropdown size="mini" trigger="click" split-button type="default" @click="handleClick" @command="handleCommand">
    修改
    <el-dropdown-menu slot="dropdown">
      <el-dropdown-item class="my-dropdown-item" command="handle-bind-admin">关联联系人</el-dropdown-item>
      <el-dropdown-item class="my-dropdown-item" style="color: red" command="handle-del">删除</el-dropdown-item>
    </el-dropdown-menu>
  </el-dropdown>
</template>

<script>
export default {
  props: [
    'scope',
  ],
  data () {
    return {
    }
  },
  mounted () {
  },
  methods: {
    handleClick () {
      this.$emit('handle-set', this.scope);
    },
    handleCommand (command) {
      this.$emit(command, this.scope);
    },
  },
}
</script>

<style scoped>
  .my-dropdown-item {
    padding: 5px 20px;
  }
</style>